home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 85 / CD Actual 85 Febrero 2004.iso / Experto / Apache / apache_2.0.48-win32-x86-no_ssl.msi / Data.Cab / F252677_mod_auth_ldap.xml < prev    next >
Encoding:
Extensible Markup Language  |  2003-04-15  |  32.0 KB  |  828 lines

  1. <?xml version="1.0"?>
  2. <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
  3. <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
  4. <modulesynopsis metafile="mod_auth_ldap.xml.meta">
  5.  
  6. <name>mod_auth_ldap</name>
  7. <description>Allows an LDAP directory to be used to store the database
  8. for HTTP Basic authentication.</description>
  9. <status>Experimental</status>
  10. <sourcefile>mod_auth_ldap.c</sourcefile>
  11. <identifier>auth_ldap_module</identifier>
  12. <compatibility>Available in version 2.0.41 and later</compatibility>
  13.  
  14. <summary>
  15.     <p><module>mod_auth_ldap</module> supports the following features:</p>
  16.  
  17.     <ul>
  18.       <li>Known to support the <a
  19.       href="http://www.openldap.org/">OpenLDAP SDK</a> (both 1.x
  20.       and 2.x), <a href="http://developer.novell.com/ndk/cldap.htm">
  21.       Novell LDAP SDK</a> and the <a
  22.       href="http://www.iplanet.com/downloads/developer/">iPlanet
  23.       (Netscape)</a> SDK.</li>
  24.  
  25.       <li>Complex authorization policies can be implemented by
  26.       representing the policy with LDAP filters.</li>
  27.  
  28.       <li>Support for Microsoft FrontPage allows FrontPage users to
  29.       control access to their webs, while retaining LDAP for user
  30.       authentication.</li>
  31.  
  32.       <li>Uses extensive caching of LDAP operations via <a
  33.       href="mod_ldap.html">mod_ldap</a>.</li>
  34.  
  35.       <li>Support for LDAP over SSL (requires the Netscape SDK) or
  36.       TLS (requires the OpenLDAP 2.x SDK or Novell LDAP SDK).</li>
  37.     </ul>
  38. </summary>
  39.  
  40. <seealso><module>mod_ldap</module></seealso>
  41.  
  42. <section id="contents"><title>Contents</title>
  43.  
  44.     <ul>
  45.       <li>
  46.         <a href="#operation">Operation</a> 
  47.  
  48.         <ul>
  49.           <li><a href="#authenphase">The Authentication
  50.           Phase</a></li>
  51.  
  52.           <li><a href="#authorphase">The Authorization
  53.           Phase</a></li>
  54.         </ul>
  55.       </li>
  56.  
  57.       <li>
  58.         <a href="#requiredirectives">The require Directives</a> 
  59.  
  60.         <ul>
  61.           <li><a href="#reqvaliduser">require valid-user</a></li>
  62.           <li><a href="#requser">require user</a></li>
  63.           <li><a href="#reqgroup">require group</a></li>
  64.           <li><a href="#reqdn">require dn</a></li>
  65.         </ul>
  66.       </li>
  67.  
  68.       <li><a href="#examples">Examples</a></li>
  69.       <li><a href="#usingtls">Using TLS</a></li>
  70.       <li><a href="#usingssl">Using SSL</a></li>
  71.  
  72.       <li>
  73.         <a href="#frontpage">Using Microsoft FrontPage with
  74.         <module>mod_auth_ldap</module></a> 
  75.  
  76.         <ul>
  77.           <li><a href="#howitworks">How It Works</a></li>
  78.           <li><a href="#fpcaveats">Caveats</a></li>
  79.         </ul>
  80.       </li>
  81.     </ul>
  82. </section>
  83.  
  84. <section id="operation"><title>Operation</title>
  85.  
  86.     <p>There are two phases in granting access to a user. The first
  87.     phase is authentication, in which <module>mod_auth_ldap</module>
  88.     verifies that the user's credentials are valid. This also called
  89.     the <em>search/bind</em> phase. The second phase is
  90.     authorization, in which <module>mod_auth_ldap</module> determines
  91.     if the authenticated user is allowed access to the resource in
  92.     question. This is also known as the <em>compare</em>
  93.     phase.</p>
  94.  
  95. <section id="authenphase"><title>The Authentication
  96.     Phase</title>
  97.  
  98.     <p>During the authentication phase, <module>mod_auth_ldap</module>
  99.     searches for an entry in the directory that matches the username
  100.     that the HTTP client passes. If a single unique match is found,
  101.     then <module>mod_auth_ldap</module> attempts to bind to the
  102.     directory server using the DN of the entry plus the password
  103.     provided by the HTTP client. Because it does a search, then a
  104.     bind, it is often referred to as the search/bind phase. Here are
  105.     the steps taken during the search/bind phase.</p>
  106.  
  107.     <ol>
  108.       <li>Generate a search filter by combining the attribute and
  109.       filter provided in the <directive module="mod_auth_ldap"
  110.       >AuthLDAPURL</directive> directive with
  111.       the username passed by the HTTP client.</li>
  112.  
  113.       <li>Search the directory using the generated filter. If the
  114.       search does not return exactly one entry, deny or decline
  115.       access.</li>
  116.  
  117.       <li>Fetch the distinguished name of the entry retrieved from
  118.       the search and attempt to bind to the LDAP server using the
  119.       DN and the password passed by the HTTP client. If the bind is
  120.       unsuccessful, deny or decline access.</li>
  121.     </ol>
  122.  
  123.     <p>The following directives are used during the search/bind
  124.     phase</p>
  125.  
  126.     <table>
  127.       <tr>
  128.         <td><directive module="mod_auth_ldap">AuthLDAPURL</directive></td>
  129.  
  130.         <td>Specifies the LDAP server, the
  131.         base DN, the attribute to use in the search, as well as the
  132.         extra search filter to use.</td>
  133.       </tr>
  134.  
  135.       <tr>
  136.         <td><directive module="mod_auth_ldap">AuthLDAPBindDN</directive></td>
  137.  
  138.         <td>An optional DN to bind with
  139.         during the search phase.</td>
  140.       </tr>
  141.  
  142.       <tr>
  143.         <td><directive
  144.         module="mod_auth_ldap">AuthLDAPBindPassword</directive></td>
  145.  
  146.         <td>An optional password to bind
  147.         with during the search phase.</td>
  148.       </tr>
  149.     </table>
  150. </section>
  151.  
  152. <section id="authorphase"><title>The Authorization
  153.     Phase</title>
  154.  
  155.     <p>During the authorization phase, <module>mod_auth_ldap</module>
  156.     attempts to determine if the user is authorized to access the
  157.     resource.  Many of these checks require
  158.     <module>mod_auth_ldap</module> to do a compare operation on the
  159.     LDAP server. This is why this phase is often referred to as the
  160.     compare phase. <module>mod_auth_ldap</module> accepts the
  161.     following <directive module="core">Require</directive>
  162.     directives to determine if the credentials are acceptable:</p>
  163.  
  164.     <ul>
  165.       <li>Grant access if there is a <a href="#requser"><code>require
  166.       valid-user</code></a> directive.</li>
  167.  
  168.       <li>Grant access if there is a <a
  169.       href="#reqgroup"><code>require user</code></a> directive, and the
  170.       username in the directive matches the username passed by the
  171.       client.</li>
  172.  
  173.       <li>Grant access if there is a <a href="#reqdn"><code>require
  174.       dn</code></a> directive, and the DN in the directive matches
  175.       the DN fetched from the LDAP directory.</li>
  176.  
  177.       <li>Grant access if there is a <a
  178.       href="#reqgroup"><code>require group</code></a> directive, and
  179.       the DN fetched from the LDAP directory (or the username
  180.       passed by the client) occurs in the LDAP group.</li>
  181.  
  182.       <li>otherwise, deny or decline access</li>
  183.     </ul>
  184.  
  185.     <p><module>mod_auth_ldap</module> uses the following directives during the
  186.     compare phase:</p>
  187.  
  188.     <table>
  189.       <tr>
  190.         <td><directive module="mod_auth_ldap">AuthLDAPURL</directive> </td>
  191.  
  192.         <td>The attribute specified in the
  193.         URL is used in compare operations for the <code>require
  194.         user</code> operation.</td>
  195.       </tr>
  196.  
  197.       <tr>
  198.         <td><directive
  199.         module="mod_auth_ldap">AuthLDAPCompareDNOnServer</directive></td>
  200.  
  201.         <td>Determines the behavior of the
  202.         <code>require dn</code> directive.</td>
  203.       </tr>
  204.  
  205.       <tr>
  206.         <td><directive
  207.         module="mod_auth_ldap">AuthLDAPGroupAttribute</directive></td>
  208.  
  209.         <td>Determines the attribute to
  210.         use for comparisons in the <code>require group</code>
  211.         directive.</td>
  212.       </tr>
  213.  
  214.       <tr>
  215.         <td><directive
  216.         module="mod_auth_ldap">AuthLDAPGroupAttributeIsDN</directive></td>
  217.  
  218.         <td>Specifies whether to use the
  219.         user DN or the username when doing comparisons for the
  220.         <code>require group</code> directive.</td>
  221.       </tr>
  222.     </table>
  223. </section>
  224. </section>
  225.  
  226. <section id="requiredirectives"><title>The require Directives</title>
  227.  
  228.     <p>Apache's <directive module="core">Require</directive>
  229.     directives are used during the authorization phase to ensure that
  230.     a user is allowed to access a resource.</p>
  231.  
  232. <section id="reqvaliduser"><title>require
  233.     valid-user</title>
  234.  
  235.     <p>If this directive exists, <module>mod_auth_ldap</module> grants
  236.     access to any user that has successfully authenticated during the
  237.     search/bind phase.</p>
  238. </section>
  239.  
  240. <section id="requser"><title>require user</title>
  241.  
  242.     <p>The <code>require user</code> directive specifies what
  243.     usernames can access the resource. Once
  244.     <module>mod_auth_ldap</module> has retrieved a unique DN from the
  245.     directory, it does an LDAP compare operation using the username
  246.     specified in the <code>require user</code> to see if that username
  247.     is part of the just-fetched LDAP entry.  Multiple users can be
  248.     granted access by putting multiple usernames on the line,
  249.     separated with spaces. If a username has a space in it, then it
  250.     must be surrounded with double quotes. Multiple users can also be
  251.     granted access by using multiple <code>require user</code>
  252.     directives, with one user per line. For example, with a <directive
  253.     module="mod_auth_ldap">AuthLDAPURL</directive> of
  254.     <code>ldap://ldap/o=Airius?cn</code> (i.e., <code>cn</code> is
  255.     used for searches), the following require directives could be used
  256.     to restrict access:</p>
  257. <example>
  258. require user "Barbara Jenson"<br />
  259. require user "Fred User"<br />
  260. require user "Joe Manager"<br />
  261. </example>
  262.  
  263.     <p>Because of the way that <module>mod_auth_ldap</module> handles this
  264.     directive, Barbara Jenson could sign on as <em>Barbara
  265.     Jenson</em>, <em>Babs Jenson</em> or any other <code>cn</code> that
  266.     she has in her LDAP entry. Only the single <code>require
  267.     user</code> line is needed to support all values of the attribute
  268.     in the user's entry.</p>
  269.  
  270.     <p>If the <code>uid</code> attribute was used instead of the
  271.     <code>cn</code> attribute in the URL above, the above three lines
  272.     could be condensed to</p>
  273. <example>require user bjenson fuser jmanager</example>
  274. </section>
  275.  
  276. <section id="reqgroup"><title>require group</title>
  277.  
  278.     <p>This directive specifies an LDAP group whose members are
  279.     allowed access. It takes the distinguished name of the LDAP
  280.     group. For example, assume that the following entry existed in
  281.     the LDAP directory:</p>
  282. <example>
  283. dn: cn=Administrators, o=Airius<br />
  284. objectClass: groupOfUniqueNames<br />
  285. uniqueMember: cn=Barbara Jenson, o=Airius<br />
  286. uniqueMember: cn=Fred User, o=Airius<br />
  287. </example>
  288.  
  289.     <p>The following directive would grant access to both Fred and
  290.     Barbara:</p>
  291. <example>require group "cn=Administrators, o=Airius"</example>
  292.  
  293.     <p>Behavior of this directive is modified by the <directive
  294.     module="mod_auth_ldap">AuthLDAPGroupAttribute</directive> and
  295.     <directive
  296.     module="mod_auth_ldap">AuthLDAPGroupAttributeIsDN</directive>
  297.     directives.</p>
  298. </section>
  299.  
  300. <section id="reqdn"><title>require dn</title>
  301.  
  302.     <p>The <code>require dn</code> directive allows the administrator
  303.     to grant access based on distinguished names. It specifies a DN
  304.     that must match for access to be granted. If the distinguished
  305.     name that was retrieved from the directory server matches the
  306.     distinguished name in the <code>require dn</code>, then
  307.     authorization is granted.</p>
  308.  
  309.     <p>The following directive would grant access to a specific
  310.     DN:</p>
  311. <example>require dn "cn=Barbara Jenson, o=Airius"</example>
  312.  
  313.     <p>Behavior of this directive is modified by the <directive
  314.     module="mod_auth_ldap">AuthLDAPCompareDNOnServer</directive>
  315.     directive.</p>
  316. </section>
  317. </section>
  318.  
  319. <section id="examples"><title>Examples</title>
  320.  
  321.     <ul>
  322.       <li>
  323.         Grant access to anyone who exists in the LDAP directory,
  324.         using their UID for searches.
  325.  
  326. <example>AuthLDAPURL "ldap://ldap1.airius.com:389/ou=People, o=Airius?uid?sub?(objectClass=*)"<br />
  327. require valid-user
  328. </example>
  329.       </li>
  330.  
  331.       <li>
  332.         The next example is the same as above; but with the fields
  333.         that have useful defaults omitted. Also, note the use of a
  334.         redundant LDAP server. 
  335. <example>AuthLDAPURL "ldap://ldap1.airius.com ldap2.airius.com/ou=People, o=Airius"<br />
  336. require valid-user
  337. </example>
  338.       </li>
  339.  
  340.       <li>
  341.         The next example is similar to the previous one, but is
  342.         uses the common name instead of the UID. Note that this
  343.         could be problematical if multiple people in the directory
  344.         share the same <code>cn</code>, because a search on <code>cn</code>
  345.         <strong>must</strong> return exactly one entry. That's why
  346.         this approach is not recommended: it's a better idea to
  347.         choose an attribute that is guaranteed unique in your
  348.         directory, such as <code>uid</code>. 
  349. <example>
  350. AuthLDAPURL "ldap://ldap.airius.com/ou=People, o=Airius?cn"<br />
  351. require valid-user
  352. </example>
  353.       </li>
  354.  
  355.       <li>
  356.         Grant access to anybody in the Administrators group. The
  357.         users must authenticate using their UID. 
  358. <example>
  359. AuthLDAPURL "ldap://ldap.airius.com/o=Airius?uid"<br />
  360. require group cn=Administrators, o=Airius
  361. </example>
  362.       </li>
  363.  
  364.       <li>
  365.         The next example assumes that everyone at Airius who
  366.         carries an alphanumeric pager will have an LDAP attribute
  367.         of <code>qpagePagerID</code>. The example will grant access
  368.         only to people (authenticated via their UID) who have
  369.         alphanumeric pagers: 
  370. <example>
  371. AuthLDAPURL "ldap://ldap.airius.com/o=Airius?uid??(qpagePagerID=*)"<br />
  372. require valid-user
  373. </example>
  374.       </li>
  375.  
  376.       <li>
  377.         <p>The next example demonstrates the power of using filters
  378.         to accomplish complicated administrative requirements.
  379.         Without filters, it would have been necessary to create a
  380.         new LDAP group and ensure that the group's members remain
  381.         synchronized with the pager users. This becomes trivial
  382.         with filters. The goal is to grant access to anyone who has
  383.         a filter, plus grant access to Joe Manager, who doesn't
  384.         have a pager, but does need to access the same
  385.         resource:</p>
  386. <example>
  387. AuthLDAPURL "ldap://ldap.airius.com/o=Airius?uid??(|(qpagePagerID=*)(uid=jmanager))"<br />
  388. require valid-user
  389. </example>
  390.  
  391.         <p>This last may look confusing at first, so it helps to
  392.         evaluate what the search filter will look like based on who
  393.         connects, as shown below. The text in blue is the part that
  394.         is filled in using the attribute specified in the URL. The
  395.         text in red is the part that is filled in using the filter
  396.         specified in the URL. The text in green is filled in using
  397.         the information that is retrieved from the HTTP client. If
  398.         Fred User connects as <code>fuser</code>, the filter would look
  399.         like</p>
  400.  
  401.         <example>(&(|(qpagePagerID=*)(uid=jmanager))(uid=fuser))</example>
  402.  
  403.         <p>The above search will only succeed if <em>fuser</em> has a
  404.         pager. When Joe Manager connects as <em>jmanager</em>, the
  405.         filter looks like</p>
  406.  
  407.         <example>(&(|(qpagePagerID=*)(uid=jmanager))(uid=jmanager))</example>
  408.  
  409.         <p>The above search will succeed whether <em>jmanager</em>
  410.         has a pager or not.</p>
  411.       </li>
  412.     </ul>
  413. </section>
  414.  
  415. <section id="usingtls"><title>Using TLS</title>
  416.  
  417.     <p>To use TLS, see the <module>mod_ldap</module> directives <directive
  418.     module="mod_ldap">LDAPTrustedCA</directive> and <directive
  419.     module="mod_ldap">LDAPTrustedCAType</directive>.</p>
  420. </section>
  421.  
  422. <section id="usingssl"><title>Using SSL</title>
  423.  
  424.     <p>To use SSL, see the <module>mod_ldap</module> directives <directive
  425.     module="mod_ldap">LDAPTrustedCA</directive> and <directive
  426.     module="mod_ldap">LDAPTrustedCAType</directive>.</p>
  427.  
  428.     <p>To specify a secure LDAP server, use <em>ldaps://</em> in the
  429.     <directive module="mod_auth_ldap">AuthLDAPURL</directive>
  430.     directive, instead of <em>ldap://</em>.</p>
  431. </section>
  432.  
  433. <section id="frontpage"><title>Using Microsoft
  434.     FrontPage with mod_auth_ldap</title>
  435.  
  436.     <p>Normally, FrontPage uses FrontPage-web-specific user/group
  437.     files (i.e., the <module>mod_auth</module> module) to handle all
  438.     authentication. Unfortunately, it is not possible to just
  439.     change to LDAP authentication by adding the proper directives,
  440.     because it will break the <em>Permissions</em> forms in
  441.     the FrontPage client, which attempt to modify the standard
  442.     text-based authorization files.</p>
  443.  
  444.     <p>Once a FrontPage web has been created, adding LDAP
  445.     authentication to it is a matter of adding the following
  446.     directives to <em>every</em> <code>.htaccess</code> file
  447.     that gets created in the web</p>
  448. <example><pre>
  449. AuthLDAPURL            "the url"
  450. AuthLDAPAuthoritative  off
  451. AuthLDAPFrontPageHack  on
  452. </pre></example>
  453.  
  454.     <p><directive
  455.     module="mod_auth_ldap">AuthLDAPAuthoritative</directive> must be
  456.     off to allow <module>mod_auth_ldap</module> to decline group
  457.     authentication so that Apache will fall back to file
  458.     authentication for checking group membership. This allows the
  459.     FrontPage-managed group file to be used.</p>
  460.  
  461. <section id="howitworks"><title>How It Works</title>
  462.  
  463.     <p>FrontPage restricts access to a web by adding the <code>require
  464.     valid-user</code> directive to the <code>.htaccess</code>
  465.     files. If <directive
  466.     module="mod_auth_ldap">AuthLDAPFrontPageHack</directive> is not
  467.     on, the <code>require valid-user</code> directive will succeed for
  468.     any user who is valid <em>as far as LDAP is
  469.     concerned</em>. This means that anybody who has an entry in
  470.     the LDAP directory is considered a valid user, whereas FrontPage
  471.     considers only those people in the local user file to be
  472.     valid. The purpose of the hack is to force Apache to consult the
  473.     local user file (which is managed by FrontPage) - instead of LDAP
  474.     - when handling the <code>require valid-user</code> directive.</p>
  475.  
  476.     <p>Once directives have been added as specified above,
  477.     FrontPage users will be able to perform all management
  478.     operations from the FrontPage client.</p>
  479. </section>
  480.  
  481. <section id="fpcaveats"><title>Caveats</title>
  482.  
  483.     <ul>
  484.       <li>When choosing the LDAP URL, the attribute to use for
  485.       authentication should be something that will also be valid
  486.       for putting into a <module>mod_auth</module> user file.
  487.       The user ID is ideal for this.</li>
  488.  
  489.       <li>When adding users via FrontPage, FrontPage administrators
  490.       should choose usernames that already exist in the LDAP
  491.       directory (for obvious reasons). Also, the password that the
  492.       administrator enters into the form is ignored, since Apache
  493.       will actually be authenticating against the password in the
  494.       LDAP database, and not against the password in the local user
  495.       file. This could cause confusion for web administrators.</li>
  496.  
  497.       <!-- XXX is that true? was mod_auth before the aaa change -->
  498.       <li>Apache must be compiled with <module>mod_auth</module> in order to
  499.       use FrontPage support. This is because Apache will still use
  500.       the <module>mod_auth</module> group file for determine the extent of a
  501.       user's access to the FrontPage web.</li>
  502.  
  503.       <li>The directives must be put in the <code>.htaccess</code>
  504.       files. Attempting to put them inside <directive module="core"
  505.       type="section">Location</directive> or <directive module="core"
  506.       type="section">Directory</directive> directives won't work. This
  507.       is because <module>mod_auth_ldap</module> has to be able to grab
  508.       the <directive module="mod_auth">AuthUserFile</directive>
  509.       directive that is found in FrontPage <code>.htaccess</code>
  510.       files so that it knows where to look for the valid user list. If
  511.       the <module>mod_auth_ldap</module> directives aren't in the same
  512.       <code>.htaccess</code> file as the FrontPage directives, then
  513.       the hack won't work, because <module>mod_auth_ldap</module> will
  514.       never get a chance to process the <code>.htaccess</code> file,
  515.       and won't be able to find the FrontPage-managed user file.</li>
  516.     </ul>
  517. </section>
  518. </section>
  519.  
  520. <directivesynopsis>
  521. <name>AuthLDAPAuthoritative</name>
  522. <description>Prevent other authentication modules from
  523. authenticating the user if this one fails</description>
  524. <syntax>AuthLDAPAuthoritative on|off</syntax>
  525. <default>AuthLDAPAuthoritative on</default>
  526. <contextlist><context>directory</context><context>.htaccess</context>
  527. </contextlist>
  528. <override>AuthConfig</override>
  529.  
  530. <usage>
  531.     <p>Set to <code>off</code> if this module should let other
  532.     authentication modules attempt to authenticate the user, should
  533.     authentication with this module fail. Control is only passed on
  534.     to lower modules if there is no DN or rule that matches the
  535.     supplied user name (as passed by the client).</p>
  536. </usage>
  537. </directivesynopsis>
  538.  
  539. <directivesynopsis>
  540. <name>AuthLDAPBindDN</name>
  541. <description>Optional DN to use in binding to the LDAP server</description>
  542. <syntax>AuthLDAPBindDN <em>distinguished-name</em></syntax>
  543. <contextlist><context>directory</context><context>.htaccess</context>
  544. </contextlist>
  545. <override>AuthConfig</override>
  546.  
  547. <usage>
  548.     <p>An optional DN used to bind to the server when searching for
  549.     entries. If not provided, <module>mod_auth_ldap</module> will use
  550.     an anonymous bind.</p>
  551. </usage>
  552. </directivesynopsis>
  553.  
  554. <directivesynopsis>
  555. <name>AuthLDAPBindPassword</name>
  556. <description>Password used in conjuction with the bind DN</description>
  557. <syntax>AuthLDAPBindPassword <em>password</em></syntax>
  558. <contextlist><context>directory</context><context>.htaccess</context>
  559. </contextlist>
  560. <override>AuthConfig</override>
  561.  
  562. <usage>
  563.     <p>A bind password to use in conjunction with the bind DN. Note
  564.     that the bind password is probably sensitive data, and should be
  565.     properly protected. You should only use the <directive
  566.     module="mod_auth_ldap">AuthLDAPBindDN</directive> and <directive
  567.     module="mod_auth_ldap">AuthLDAPBindPassword</directive> if you
  568.     absolutely need them to search the directory.</p> 
  569. </usage>
  570. </directivesynopsis>
  571.  
  572. <directivesynopsis>
  573. <name>AuthLDAPCharsetConfig</name>
  574. <description>Language to charset conversion configuration file</description>
  575. <syntax>AuthLDAPCharsetConfig <em>file-path</em></syntax>
  576. <contextlist><context>server config</context>
  577. </contextlist>
  578.  
  579. <usage>
  580.     <p>The <directive>AuthLDAPCharsetConfig</directive> directive sets the location
  581.     of the language to charset conversion configuration file. <var>File-path</var> is relative
  582.     to the <directive module="core">ServerRoot</directive>. This file specifies
  583.     the list of language extensions to character sets.
  584.     Most administrators use the provided <code>charset.conv</code>
  585.     file, which associates common language extensions to character sets.</p>
  586.  
  587.     <p>The file contains lines in the following format:</p>
  588.  
  589.     <example>
  590.       <var>Language-Extension</var> <var>charset</var> [<var>Language-String</var>] ...
  591.     </example>
  592.  
  593.     <p>The case of the extension does not matter. Blank lines, and lines
  594.     beginning with a hash character (<code>#</code>) are ignored.</p>
  595. </usage>
  596. </directivesynopsis>
  597.  
  598. <directivesynopsis>
  599. <name>AuthLDAPCompareDNOnServer</name>
  600. <description>Use the LDAP server to compare the DNs</description>
  601. <syntax>AuthLDAPCompareDNOnServer on|off</syntax>
  602. <default>AuthLDAPCompareDNOnServer on</default>
  603. <contextlist><context>directory</context><context>.htaccess</context>
  604. </contextlist>
  605. <override>AuthConfig</override>
  606.  
  607. <usage>
  608.     <p>When set, <module>mod_auth_ldap</module> will use the LDAP
  609.     server to compare the DNs. This is the only foolproof way to
  610.     compare DNs.  <module>mod_auth_ldap</module> will search the
  611.     directory for the DN specified with the <a
  612.     href="#reqdn"><code>require dn</code></a> directive, then,
  613.     retrieve the DN and compare it with the DN retrieved from the user
  614.     entry. If this directive is not set,
  615.     <module>mod_auth_ldap</module> simply does a string comparison. It
  616.     is possible to get false negatives with this approach, but it is
  617.     much faster. Note the <module>mod_ldap</module> cache can speed up
  618.     DN comparison in most situations.</p>
  619. </usage>
  620. </directivesynopsis>
  621.  
  622. <directivesynopsis>
  623. <name>AuthLDAPDereferenceAliases</name>
  624. <description>When will the module de-reference aliases</description>
  625. <syntax>AuthLDAPDereferenceAliases never|searching|finding|always</syntax>
  626. <default>AuthLDAPDereferenceAliases Always</default>
  627. <contextlist><context>directory</context><context>.htaccess</context>
  628. </contextlist>
  629. <override>AuthConfig</override>
  630.  
  631. <usage>
  632.     <p>This directive specifies when <module>mod_auth_ldap</module> will
  633.     de-reference aliases during LDAP operations. The default is
  634.     <code>always</code>.</p>
  635. </usage>
  636. </directivesynopsis>
  637.  
  638. <directivesynopsis>
  639. <name>AuthLDAPEnabled</name>
  640. <description>Turn on or off LDAP authentication</description>
  641. <syntax> AuthLDAPEnabled on|off</syntax>
  642. <default>AuthLDAPEnabled on</default>
  643. <contextlist><context>directory</context><context>.htaccess</context>
  644. </contextlist>
  645. <override>AuthConfig</override>
  646.  
  647. <usage>
  648.     <p>Set to <code>off</code> to disable
  649.     <module>mod_auth_ldap</module> in certain directories. This is
  650.     useful if you have <module>mod_auth_ldap</module> enabled at or
  651.     near the top of your tree, but want to disable it completely in
  652.     certain locations.</p> 
  653. </usage>
  654. </directivesynopsis>
  655.  
  656. <directivesynopsis>
  657. <name>AuthLDAPFrontPageHack</name>
  658. <description>Allow LDAP authentication to work with MS FrontPage</description>
  659. <syntax>AuthLDAPFrontPageHack on|off</syntax>
  660. <default>AuthLDAPFrontPageHack off</default>
  661. <contextlist><context>directory</context><context>.htaccess</context>
  662. </contextlist>
  663. <override>AuthConfig</override>
  664.  
  665. <usage>
  666.     <p>See the section on <a href="#frontpage">using Microsoft
  667.     FrontPage</a> with <module>mod_auth_ldap</module>.</p>
  668. </usage>
  669. </directivesynopsis>
  670.  
  671. <directivesynopsis>
  672. <name>AuthLDAPGroupAttribute</name>
  673. <description>LDAP attributes used to check for group membership</description>
  674. <syntax>AuthLDAPGroupAttribute <em>attribute</em></syntax>
  675. <contextlist><context>directory</context><context>.htaccess</context>
  676. </contextlist>
  677. <override>AuthConfig</override>
  678.  
  679. <usage>
  680.     <p>This directive specifies which LDAP attributes are used to
  681.     check for group membership. Multiple attributes can be used by
  682.     specifying this directive multiple times. If not specified,
  683.     then <module>mod_auth_ldap</module> uses the <code>member</code> and
  684.     <code>uniquemember</code> attributes.</p>
  685. </usage>
  686. </directivesynopsis>
  687.  
  688. <directivesynopsis>
  689. <name>AuthLDAPGroupAttributeIsDN</name>
  690. <description>Use the DN of the client username when checking for
  691. group membership</description>
  692. <syntax>AuthLDAPGroupAttributeIsDN on|off</syntax>
  693. <default>AuthLDAPGroupAttributeIsDN on</default>
  694. <contextlist><context>directory</context><context>.htaccess</context>
  695. </contextlist>
  696. <override>AuthConfig</override>
  697.  
  698. <usage>
  699.     <p>When set <code>on</code>, this directive says to use the
  700.     distinguished name of the client username when checking for group
  701.     membership.  Otherwise, the username will be used. For example,
  702.     assume that the client sent the username <code>bjenson</code>,
  703.     which corresponds to the LDAP DN <code>cn=Babs Jenson,
  704.     o=Airius</code>. If this directive is set,
  705.     <module>mod_auth_ldap</module> will check if the group has
  706.     <code>cn=Babs Jenson, o=Airius</code> as a member. If this
  707.     directive is not set, then <module>mod_auth_ldap</module> will
  708.     check if the group has <code>bjenson</code> as a member.</p>
  709. </usage>
  710. </directivesynopsis>
  711.  
  712. <directivesynopsis>
  713. <name>AuthLDAPRemoteUserIsDN</name>
  714. <description>Use the DN of the client username to set the REMOTE_USER
  715. environment variable</description>
  716. <syntax>AuthLDAPRemoteUserIsDN on|off</syntax>
  717. <default>AuthLDAPRemoteUserIsDN off</default>
  718. <contextlist><context>directory</context><context>.htaccess</context>
  719. </contextlist>
  720. <override>AuthConfig</override>
  721.  
  722. <usage>
  723.     <p>If this directive is set to on, the value of the
  724.     <code>REMOTE_USER</code> environment variable will be set to the full
  725.     distinguished name of the authenticated user, rather than just
  726.     the username that was passed by the client. It is turned off by
  727.     default.</p>
  728. </usage>
  729. </directivesynopsis>
  730.  
  731. <directivesynopsis>
  732. <name>AuthLDAPUrl</name>
  733. <description>URL specifying the LDAP search parameters</description>
  734. <syntax>AuthLDAPUrl <em>url</em></syntax>
  735. <contextlist><context>directory</context><context>.htaccess</context>
  736. </contextlist>
  737. <override>AuthConfig</override>
  738.  
  739. <usage>
  740.     <p>An RFC 2255 URL which specifies the LDAP search parameters
  741.     to use. The syntax of the URL is</p>
  742. <example>ldap://host:port/basedn?attribute?scope?filter</example>
  743.  
  744. <dl>
  745. <dt>ldap</dt>
  746.  
  747.         <dd>For regular ldap, use the
  748.         string <code>ldap</code>. For secure LDAP, use <code>ldaps</code>
  749.         instead. Secure LDAP is only available if Apache was linked
  750.         to an LDAP library with SSL support.</dd>
  751.  
  752. <dt>host:port</dt>
  753.  
  754.         <dd>
  755.           <p>The name/port of the ldap server (defaults to
  756.           <code>localhost:389</code> for <code>ldap</code>, and
  757.           <code>localhost:636</code> for <code>ldaps</code>). To
  758.           specify multiple, redundant LDAP servers, just list all
  759.           servers, separated by spaces. <module>mod_auth_ldap</module>
  760.           will try connecting to each server in turn, until it makes a
  761.           successful connection.</p>
  762.  
  763.           <p>Once a connection has been made to a server, that
  764.           connection remains active for the life of the
  765.           <code>httpd</code> process, or until the LDAP server goes
  766.           down.</p>
  767.  
  768.           <p>If the LDAP server goes down and breaks an existing
  769.           connection, <module>mod_auth_ldap</module> will attempt to
  770.           re-connect, starting with the primary server, and trying
  771.           each redundant server in turn. Note that this is different
  772.           than a true round-robin search.</p>
  773.         </dd>
  774.  
  775. <dt>basedn</dt>
  776.  
  777.         <dd>The DN of the branch of the
  778.         directory where all searches should start from. At the very
  779.         least, this must be the top of your directory tree, but
  780.         could also specify a subtree in the directory.</dd>
  781.  
  782. <dt>attribute</dt>
  783.  
  784.         <dd>The attribute to search for.
  785.         Although RFC 2255 allows a comma-separated list of
  786.         attributes, only the first attribute will be used, no
  787.         matter how many are provided. If no attributes are
  788.         provided, the default is to use <code>uid</code>. It's a good
  789.         idea to choose an attribute that will be unique across all
  790.         entries in the subtree you will be using.</dd>
  791.  
  792. <dt>scope</dt>
  793.  
  794.         <dd>The scope of the search. Can be either <code>one</code> or
  795.         <code>sub</code>. Note that a scope of <code>base</code> is
  796.         also supported by RFC 2255, but is not supported by this
  797.         module. If the scope is not provided, or if <code>base</code> scope
  798.         is specified, the default is to use a scope of
  799.         <code>sub</code>.</dd>
  800.  
  801. <dt>filter</dt>
  802.  
  803.         <dd>A valid LDAP search filter. If
  804.         not provided, defaults to <code>(objectClass=*)</code>, which
  805.         will search for all objects in the tree. Filters are
  806.         limited to approximately 8000 characters (the definition of
  807.         <code>MAX_STRING_LEN</code> in the Apache source code). This
  808.         should be than sufficient for any application.</dd>
  809. </dl>
  810.  
  811.     <p>When doing searches, the attribute, filter and username passed
  812.     by the HTTP client are combined to create a search filter that
  813.     looks like
  814.     <code>(&(<em>filter</em>)(<em>attribute</em>=<em>username</em>))</code>.</p>
  815.  
  816.     <p>For example, consider an URL of
  817.     <code>ldap://ldap.airius.com/o=Airius?cn?sub?(posixid=*)</code>. When
  818.     a client attempts to connect using a username of <code>Babs
  819.     Jenson</code>, the resulting search filter will be
  820.     <code>(&(posixid=*)(cn=Babs Jenson))</code>.</p>
  821.  
  822.     <p>See above for examples of <directive
  823.     module="mod_auth_ldap">AuthLDAPURL</directive> URLs.</p>
  824. </usage>
  825. </directivesynopsis>
  826.  
  827. </modulesynopsis>
  828.